<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm" method="post" enctype="multipart/form-data" action="/system/loanProduct/upload">
							<input id="product_id" name="id" th:value="${loanProduct.id}"  type="hidden">
							<input id="product_name" name="product_name" th:value="${loanProduct.productName}" type="hidden">
							<input id="userId" name="userId" th:value="${loanProduct.userId}" type="hidden">
							<div class="acc_sc">
								<label class="col-sm-3 control-label">上传文件：</label>
								<input type="file" id="file" name="file"/>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="button" class="btn btn-primary" onclick="uploadFile()">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/jquery.form.js"></script>

	<script type="text/javascript">
        function uploadFile() {
            $("#signupForm").submit();

            parent.layer.msg("上传成功");
            parent.reLoad();
            var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
            parent.layer.close(index);
        }
	</script>
</body>
</html>
